package com.itheima.service.impl;

import com.alibaba.dubbo.config.annotation.Service;
import com.itheima.domain.User;
import com.itheima.mapper.UserMapper;
import com.itheima.service.UserService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.transaction.annotation.Transactional;

/**
 * @PackageName: com.itheima.service.impl
 * @ClassName: UserServiceImpl
 * @Author: Solomon
 * @Date: 2020/7/14 23:40
 * @Description:
 */
@Service(interfaceClass = UserService.class)
@Transactional
public class UserServiceImpl implements UserService {

    @Autowired
    private UserMapper userMapper;


    //根据用户名查询用户的基本信息和所属角色以及权限
    @Override
    public User findUserByUsername(String username) {
        //一步到位
        return userMapper.findUserByUsername(username);
    }
}
